﻿<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="Model" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  <EntityType Name="AuthorizationStorageManager">
    <Key>
      <PropertyRef Name="account_ID" />
    </Key>
    <Property Name="account_ID" Type="Byte" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  </EntityType>
  <EntityType Name="ManufacturedMachines">
    <Key>
      <PropertyRef Name="machine_ID" />
    </Key>
    <Property Name="machine_ID" Type="Byte" Nullable="false" />
    <Property Name="typeMachine_ID" Type="Byte" Nullable="false" />
    <Property Name="nameMachine" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <Property Name="photo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
    <Property Name="makingDate" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="TypeMachine" Relationship="Self.FK1_ManufacturedMachines" FromRole="ManufacturedMachines" ToRole="TypeMachine" />
  </EntityType>
  <EntityType Name="TypeMachine">
    <Key>
      <PropertyRef Name="typeMachine_ID" />
    </Key>
    <Property Name="typeMachine_ID" Type="Byte" Nullable="false" />
    <Property Name="name" Type="String" MaxLength="30" FixedLength="false" Unicode="true" Nullable="false" />
    <NavigationProperty Name="ManufacturedMachines" Relationship="Self.FK1_ManufacturedMachines" FromRole="TypeMachine" ToRole="ManufacturedMachines" />
  </EntityType>
  <Association Name="FK1_ManufacturedMachines">
    <End Role="TypeMachine" Type="Self.TypeMachine" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="ManufacturedMachines" Type="Self.ManufacturedMachines" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="TypeMachine">
        <PropertyRef Name="typeMachine_ID" />
      </Principal>
      <Dependent Role="ManufacturedMachines">
        <PropertyRef Name="typeMachine_ID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="AuthorizationStorageManager" EntityType="Self.AuthorizationStorageManager" />
    <EntitySet Name="ManufacturedMachines" EntityType="Self.ManufacturedMachines" />
    <EntitySet Name="TypeMachine" EntityType="Self.TypeMachine" />
    <AssociationSet Name="FK1_ManufacturedMachines" Association="Self.FK1_ManufacturedMachines">
      <End Role="TypeMachine" EntitySet="TypeMachine" />
      <End Role="ManufacturedMachines" EntitySet="ManufacturedMachines" />
    </AssociationSet>
  </EntityContainer>
</Schema>